package com.yeyks.app.controller.base.vip;


import com.yeyks.common.ajax.AjaxResponseBody;
import com.yeyks.hotel.dal.domain.HotelRecommendCity;
import com.yeyks.hotel.service.HotelRecommendCityService;
import com.yeyks.hotel.vo.RecommendCityEnableListVo;
import com.yeyks.vip.service.VipOpenCityService;
import com.yeyks.vip.vo.VipOpenCityEnableListVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * vip开放城市 前端控制器
 * </p>
 *
 * @author yun
 * @since 2019-12-26
 */
@Api(tags = "vip开放城市", description = "vip开放城市")
@RestController
@RequestMapping("/app/vipOpenCity")
public class VipOpenCityController {

    @Autowired
    private VipOpenCityService vipOpenCityService;

    @Autowired
    HotelRecommendCityService hotelRecommendCityService ;

    @ApiOperation(value = "开放城市:v4.0.0", notes = "开放城市")
    @PostMapping("/enable/list")
    public AjaxResponseBody<VipOpenCityEnableListVo> enableList() {

//        return AjaxResponseBody.success(
//                new RecommendCityEnableListVo()
//                        .setHot(hotelRecommendCityService.enableList(1))
//                        .setNormal(hotelRecommendCityService.enableList(null))
//        );
        return AjaxResponseBody.success(
                new VipOpenCityEnableListVo()
                        .setHot(vipOpenCityService.enableList(1))
                        .setNormal(vipOpenCityService.enableList(null))
        );
    }

}
